package com.aspose.cells;

public class ScrollBar extends Shape {
   int a = 0;
   int b = 0;
   int c = 100;
   int d = 1;
   int e = 10;
   private boolean A = false;

   ScrollBar(ShapeCollection shapes) {
      super(shapes, 17, shapes);
      this.z = true;
   }

   public int getCurrentValue() {
      return this.a;
   }

   public void setCurrentValue(int value) {
      this.b(value);
      if (value < (this.b & '\uffff')) {
         this.a = this.b;
      } else if (value > (this.c & '\uffff')) {
         this.a = this.c;
      } else {
         this.a = value;
      }

      Cell var2 = this.e(true);
      if (var2 != null) {
         if (value >= 0) {
            var2.putValue(this.a & '\uffff');
         } else {
            var2.putValue((String)null);
         }
      }

   }

   void a(int var1) {
      this.a = var1;
   }

   public int getMin() {
      return this.b;
   }

   public void setMin(int value) {
      this.b(value);
      if (value > (this.c & '\uffff')) {
         throw new IllegalArgumentException("The scroll value maximum cannot be less than the scroll value minmum");
      } else {
         this.b = value;
         if ((this.a & '\uffff') < value) {
            this.a = value;
         }

      }
   }

   public int getMax() {
      return this.c;
   }

   public void setMax(int value) {
      this.b(value);
      if (value < (this.b & '\uffff')) {
         throw new IllegalArgumentException("The scroll value maximum cannot be less than the scroll value minmum");
      } else {
         this.c = value;
         if ((this.a & '\uffff') > value) {
            this.a = value;
         }

      }
   }

   public int getIncrementalChange() {
      return this.d;
   }

   public void setIncrementalChange(int value) {
      this.b(value);
      this.d = value;
   }

   public int getPageChange() {
      return this.e;
   }

   public void setPageChange(int value) {
      this.b(value);
      this.e = value;
   }

   private void b(int var1) {
      if (var1 < 0 || var1 > 30000) {
         throw new IllegalArgumentException("Scroll value must be between 0 and 30000.");
      }
   }

   public boolean getShadow() {
      return this.z;
   }

   public void setShadow(boolean value) {
      this.z = value;
   }

   public boolean isHorizontal() {
      return this.A;
   }

   public void setHorizontal(boolean value) {
      this.A = value;
   }

   void a(ScrollBar var1, CopyOptions var2) {
      this.A = var1.A;
      this.b = var1.b;
      this.c = var1.c;
      this.e = var1.e;
      this.d = var1.d;
      this.a = var1.a;
      super.a((Shape)var1, (CopyOptions)var2);
   }
}
